/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.itschapala.dsw2.vista;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author Dhavis
 */
@ManagedBean
@RequestScoped
public class AccessBean {

    /**
     * Creates a new instance of AccessBean
     */
   //------variables(propiedades)----------------------------------------
    private String name;
    private String password;
    //-------------constructor--------------------------------------------

    public String getPassword() {
        return password;
    }
//------------metodos GET y SET-------------------------------------------

    public void setPassword(String password) {
        this.password = password;
    }

    public AccessBean() {
    }

    public String getName() {
        System.out.println("Entro al GET");
        return name;
    }

    public void setName(String name) {
        System.out.println("Entro al SET");
        this.name = name;
    }
    //------------------Acciones----------------------------
        public String validarEntrada(){//entrada en lugar de login
            if(name.equals("Admin") && password.equals("12345")){//////////////////////no entra al metodo
                return "MenuPrincipal";
            } else{
                return "Pagina2";
            }
        }
}
